﻿export default [
  {
    path: '/user',
    component: '../layouts/UserLayout',
    routes: [
      {
        name: 'login',
        path: '/user/login',
        component: './user/login',
      },
    ],
  },
  {
    path: '/',
    component: '../layouts/SecurityLayout',
    routes: [
      {
        path: '/',
        component: '../layouts/BasicLayout',
        authority: ['admin', 'user'],
        routes: [
          {
            path: '/',
            redirect: '/publish/list',
          },
          {
            name: '发布管理',
            icon: 'table',
            path: '/publish',
            routes: [
              {
                path: '/publish/list',
                name: '发布资料',
                icon: 'table',
                component: './publish/publish',
                authority: ['admin'],
              },
              {
                path: '/publish/toolproduct',
                name: '工具软件检索',
                icon: 'table',
                component: './publish/toolproduct',
              },
              {
                path: '/publish/versionsearch',
                name: '版本检索',
                icon: 'table',
                component: './publish/search',
              },
              {
                path: '/publish/email',
                name: '邮箱管理',
                icon: 'table',
                component: './publish/email',
              },
            ],
          },
          {
            name: '订单管理',
            icon: 'table',
            path: '/order',
            routes: [
              {
                path: '/order/list',
                name: '订单列表',
                icon: 'table',
                component: './order/order',
              },
              {
                path: '/order/devices',
                name: '设备列表',
                icon: 'table',
                component: './order/device',
              },
            ],
          },
          {
            name: '产品管理',
            icon: 'table',
            path: '/product',
            routes: [
              {
                path: '/product/list',
                name: '产品列表',
                icon: 'table',
                component: './product/product',
              },
            ],
          },
          {
            name: '用户管理',
            icon: 'table',
            path: '/users',
            authority: ['admin'],
            routes: [
              {
                path: '/users/list',
                name: '用户列表',
                icon: 'table',
                component: './users/users',
              },
            ],
          },
          {
            component: './404',
          },
        ],
      },
      {
        component: './404',
      },
    ],
  },
  {
    component: './404',
  },
];
